Type = rep(c("Globalization", "Automation"), 2)
)
con_edu
# read new data
data <- read.csv("data.csv")
summary(c2)
###############################
## Appendix Table A13 ##
###############################
c1 <- lm(con ~ globalization + automation, data = data[data$college == 1,])
c2 <- lm(con ~ globalization + automation + income +
+ female + age, data = data[data$college == 1,])
c3 <- lm(con ~ globalization + automation, data = data[data$college == 0,])
c4 <- lm(con ~ globalization + automation + income +
+ female + age, data = data[data$college == 0,])
texreg(list(c1, c2, c3, c4), style = "AJPS")
# Sample data based on the provided image
con_edu <- data.frame(
Education = factor(rep(c("Below College", "College or Above"), each=2)),
estimate = c(0.18, 0.8, 0.34, 0.7),
sd = c(0.11, 0.11, 0.14, 0.14),
Type = rep(c("Globalization", "Automation"), 2)
)
con_edu
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point()
# Sample data based on the provided image
con_edu <- data.frame(
Education = factor(rep(c("Below College", "College or Above"), each=2)),
estimate = c(0.18, 0.08, 0.34, 0.07),
sd = c(0.11, 0.11, 0.14, 0.14),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point()
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position = pd)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(shape = 19)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(shape = 19)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(shape = 19) +
geom_linerange(aes(ymin = estimate-1.96*stderror, ymax = estimate+1.96*stderror),
lwd = 1/2)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(shape = 19) +
geom_linerange(aes(ymin = estimate-1.96*stderror, ymax = estimate+1.96*stderror))
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(shape = 19) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd))
library(ggplot2)
# Sample data
data <- data.frame(
category = rep(c("A", "B", "C"), each = 10),
x = rep(1:10, 3),
y = rnorm(30)
)
# Create the plot
ggplot(data, aes(x = x, y = y, color = category)) +
geom_point(position = position_dodge(width = 0.5)) +  # Adjust the width to spread out points
geom_line(aes(group = category), position = position_dodge(width = 0.5)) +  # Ensure lines align with points
theme_minimal()
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd))
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5))
# Sample data based on the provided image
con_edu <- data.frame(
Education = factor(rep(c("College or Above", "Below College"), each=2)),
estimate = c(0.18, 0.08, 0.34, 0.07),
sd = c(0.11, 0.11, 0.14, 0.14),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "",
y = "Coefficient estimate",
color = "") +
geom_hline(yintercept = 0,
linetype = "dashed") +
theme_bw(base_size = 14)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14) +
theme(panel.border = element_blank(), panel.grid.major = element_blank(),
panel.grid.minor = element_blank(), axis.line = element_line(colour = "black"),
legend.position = "",
axis.title=element_text(size=12),
axis.text.x=element_text(colour="black"),
axis.text.y=element_text(colour="black")) +
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14) +
theme(panel.border = element_blank(), panel.grid.major = element_blank(),
panel.grid.minor = element_blank(), axis.line = element_line(colour = "black"),
legend.position = "",
axis.title=element_text(size=12),
axis.text.x=element_text(colour="black"),
axis.text.y=element_text(colour="black")) +
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed")
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed")
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.6)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.6) +
theme(panel.border = element_blank(), panel.grid.major = element_blank(),
panel.grid.minor = element_blank(), axis.line = element_line(colour = "black"),
legend.position = "",
axis.title=element_text(size=12),
axis.text.x=element_text(colour="black"),
axis.text.y=element_text(colour="black"))
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.6) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
con_edu
# Sample data based on the provided image
con_edu <- data.frame(
Education = factor(rep(c("College or Above", "Below College"), each=2)),
estimate = c(0.18, 0.08, 0.34, 0.07),
sd = c(0.11, 0.11, 0.14, 0.14),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.6) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
# Sample data based on the provided image
con_edu <- data.frame(
Education = factor(rep(c("College or Above", "Below College"), each=2)),
estimate = c(0.18, 0.08, 0.34, 0.07),
sd = c(0.11, 0.11, 0.14, 0.14),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.6) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.7) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.7) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggsave("con_edu.pdf")
ggsave("figure3b.pdf", width = 8, height = 6, dpi = 1200)
ggsave("con_edu.pdf", width = 8,  height = 6, dpi = 1200)
ggsave("con_edu.pdf", width = 9,  height = 6, dpi = 1200)
ggsave("con_edu.pdf", width = 9,  height = 5, dpi = 1200)
ggsave("con_edu.pdf", width = 9,  height = 7, dpi = 1200)
con_edu <- data.frame(
Income = factor(rep(c("Above median", "Below median"), each=2)),
estimate = c(-0.14, -0.21, 0.54, 0.30),
sd = c(0.12, 0.12, 0.12, 0.12),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_edu, aes(y = estimate, x = Income, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.7) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
con_inc <- data.frame(
Income = factor(rep(c("Above median", "Below median"), each=2)),
estimate = c(-0.14, -0.21, 0.54, 0.30),
sd = c(0.12, 0.12, 0.12, 0.12),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_inc, aes(y = estimate, x = Income, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggplot(con_inc, aes(y = estimate, x = Income, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.5, 0.8) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggplot(con_inc, aes(y = estimate, x = Income, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.7, 0.8) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggplot(con_inc, aes(y = estimate, x = Income, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.8, 0.8) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
con_inc <- data.frame(
Income = factor(rep(c("Above median", "Below median"), each=2)),
estimate = c(-0.14, -0.21, 0.54, 0.30),
sd = c(0.12, 0.12, 0.12, 0.12),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_inc, aes(y = estimate, x = Income, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.8, 0.8) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggsave("con_inc.pdf", width = 9,  height = 7, dpi = 1200)
con_inc <- data.frame(
Unemployment = factor(rep(c("Unemployment experience (yes)", "Unemployment experience (no)"), each=2)),
estimate = c(-0.14, -0.21, 0.54, 0.30),
sd = c(0.12, 0.12, 0.12, 0.12),
Type = rep(c("Globalization", "Automation"), 2)
)
con_uemp <- data.frame(
Unemployment = factor(rep(c("Unemployment experience (yes)", "Unemployment experience (no)"), each=2)),
estimate = c(-0.14, -0.21, 0.54, 0.30),
sd = c(0.12, 0.12, 0.12, 0.12),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_uemp, aes(y = estimate, x = Unemployment, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.8, 0.8) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggsave("con_uemp.pdf", width = 9,  height = 7, dpi = 1200)
con_uemp <- data.frame(
Unemployment = factor(rep(c("Unemployment experience (yes)", "Unemployment experience (no)"), each=2)),
estimate = c(0.32, 0.22, 0.25, -0.05),
sd = c(0.13, 0.13, 0.12, 0.12),
Type = rep(c("Globalization", "Automation"), 2)
)
con_uemp
con_uemp <- data.frame(
Unemployment = factor(rep(c("Unemployment experience (yes)", "Unemployment experience (no)"), each=2)),
estimate = c(0.32, 0.22, 0.17, -0.05),
sd = c(0.13, 0.13, 0.12, 0.12),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_uemp, aes(y = estimate, x = Unemployment, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.8, 0.8) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggplot(con_uemp, aes(y = estimate, x = Unemployment, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.6) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggsave("con_uemp.pdf", width = 9,  height = 7, dpi = 1200)
con_edu <- data.frame(
Education = factor(rep(c("College or Above", "Below College"), each=2)),
estimate = c(0.18, 0.08, 0.34, 0.07),
sd = c(0.11, 0.11, 0.14, 0.14),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.7) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggsave("con_edu.pdf", width = 9,  height = 7, dpi = 1200)
con_inc <- data.frame(
Income = factor(rep(c("Above median", "Below median"), each=2)),
estimate = c(-0.14, -0.21, 0.54, 0.30),
sd = c(0.12, 0.12, 0.12, 0.12),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_inc, aes(y = estimate, x = Income, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.8, 0.8) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggsave("con_inc.pdf", width = 9,  height = 7, dpi = 1200)
con_uemp <- data.frame(
Unemployment = factor(rep(c("Unemployment experience (yes)", "Unemployment experience (no)"), each=2)),
estimate = c(0.32, 0.22, 0.17, -0.05),
sd = c(0.13, 0.13, 0.12, 0.12),
Type = rep(c("Globalization", "Automation"), 2)
)
ggplot(con_uemp, aes(y = estimate, x = Unemployment, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.6) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggsave("con_uemp.pdf", width = 9,  height = 7, dpi = 1200)
View(c3)
library(gridExtra)
plot1 <- ggplot(con_edu, aes(y = estimate, x = Education, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.7) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
ggsave(plot1, "con_edu.pdf", width = 9,  height = 7, dpi = 1200)
ggsave("con_edu.pdf", width = 9,  height = 7, dpi = 1200)
plot2 <- ggplot(con_inc, aes(y = estimate, x = Income, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.8, 0.8) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
plot3 <- ggplot(con_uemp, aes(y = estimate, x = Unemployment, group = Type)) +
geom_point(position =  position_dodge(width = 0.5)) +
geom_linerange(aes(ymin = estimate-1.96*sd, ymax = estimate+1.96*sd),
position = position_dodge(width = 0.5), lwd = 1/2) +
geom_linerange(aes(ymin = estimate-1.645*sd, ymax = estimate+1.645*sd),
position = position_dodge(width = 0.5), lwd = 1) +
labs(x = "", y = "Coefficient estimate", color = "") +
geom_hline(yintercept = 0,linetype = "dashed") +
theme_bw(base_size = 14)+
ylim(-0.6, 0.6) +
geom_text(aes(label = Type), position = position_dodge(width = 0.5), vjust = -1, hjust = -0.1)
grid.arrange(plot1, plot2, plot3, ncol = 1)
grid.arrange(plot1, plot2, plot3, ncol = 3)
combined_plot <- grid.arrange(plot1, plot2, plot3, ncol = 3)
ggsave("plots", plot = combined_plot, width = 8, height = 12)
ggsave("combined_plot.jpg", plot = combined_plot, width = 8, height = 12)
combined_plot <- grid.arrange(plot1, plot2, plot3, ncol = 3)
ggsave("combined_plot.jpg", plot = combined_plot, width = 8, height = 12)
ggsave("combined_plot.jpg", plot = combined_plot, width = 12, height = 8)
ggsave("combined_plot.jpg", plot = combined_plot, width = 12, height = 6)
ggsave("combined_plot.jpg", plot = combined_plot, width = 12, height = 4)
combined_plot <- grid.arrange(plot1, plot2, plot3, ncol = 2)
ggsave("combined_plot.jpg", plot = combined_plot, width = 12, height = 4)
ggsave("combined_plot.jpg", plot = combined_plot, width = 12, height = 8)
combined_plot <- grid.arrange(plot1, plot2, plot3, ncol = 2)
ggsave("combined_plot.jpg", plot = combined_plot, width = 12, height = 8)
ggsave("combined_plot.jpg", plot = combined_plot, width = 15, height = 8)
combined_plot <- grid.arrange(plot1, plot2, plot3, ncol = 2)
ggsave("combined_plot.jpg", plot = combined_plot, width = 15, height = 8)
ggsave("combined_plot.jpg", plot = combined_plot, width = 15, height = 10)
combined_plot <- grid.arrange(plot1, plot2, plot3, ncol = 2)
ggsave("combined_plot.jpg", plot = combined_plot, width = 15, height = 10)
